MEMORY {
#RAM Addresses:
    # Zero page
    ZP: start = $00, size = $100, type = rw, define = yes;
	#note, the c compiler + neslib + famitone2 use about 60 zp addresses, I think
	
	#note OAM: start = $0200, size = $0100, define = yes;
	#note, sprites stored here in the RAM
	
	RAM: start = $0300, size = $0400, define = yes;
	#note VRAM_BUFFER: start = $700, size = 128, define = yes;

#INES Header:
    HEADER: start = $0, size = $10, file = %O ,fill = yes;


#ROM Addresses:
    PRG: start = $8000, size = $8000, file = %O ,fill = yes, define = yes;


#1 Bank of 8K CHR ROM
    CHR: start = $0000, size = $2000, file = %O, fill = yes;
}




SEGMENTS {
    HEADER:   load = HEADER,         type = ro;
    STARTUP:  load = PRG,            type = ro,  define = yes;
    LOWCODE:  load = PRG,            type = ro,                optional = yes;
    INIT:     load = PRG,            type = ro,  define = yes, optional = yes;
    CODE:     load = PRG,            type = ro,  define = yes;
    RODATA:   load = PRG,            type = ro,  define = yes;
    DATA:     load = PRG, run = RAM, type = rw,  define = yes;
    CHARS:    load = CHR,            type = rw;
    BSS:      load = RAM,            type = bss, define = yes;
    HEAP:     load = RAM,            type = bss, optional = yes;
    ZEROPAGE: load = ZP,             type = zp;
    ONCE:     load = PRG,            type = ro,  define = yes, optional = yes;
	
	SAMPLES:  load = PRG, start = $f000, type = ro, optional = yes;
	VECTORS:  load = PRG, start = $fffa, type = ro;
}




#removed CONDES features




SYMBOLS {

    __STACKSIZE__: type = weak, value = $0100;     # 1 page stack
	__STACK_START__: type = weak, value = $0700;
	
	NES_MAPPER:	  type = weak, value = 0; 			# mapper number, 0 = NROM
	NES_PRG_BANKS:	 type = weak,  value = 2; 			# number of 16K PRG banks, change to 2 for NROM256
	NES_CHR_BANKS:	  type = weak, value = 1; 			# number of 8K CHR banks
	NES_MIRRORING:	  type = weak, value = 1; 			# 0 horizontal, 1 vertical, 8 four screen
	
}

